package com.yhcui.rabbit.tools;

import java.math.BigDecimal;
import java.text.DecimalFormat;

/**
 * 金额格式化
 */
public class AmountUtils {

    private static final String DEFAULT_MONEY_FORMAT = "###0.00";

    private AmountUtils() {

    }


    public static String formatAmonut(String amont) {
        DecimalFormat df = new DecimalFormat(DEFAULT_MONEY_FORMAT);
        return df.format(new BigDecimal(amont));
    }

    public static void main(String[] args) {
        System.out.println(AmountUtils.formatAmonut("34"));
    }

}
